islock()
{
if [[ -f "$1" && $(awk -F ',' '{print $1}' $1) -eq 1 ]];then
	echo 1
fi
echo 0
}
lock()
{
echo "1,$2">$1
}
unlock()
{
echo "0,0">$1
}